package cn.hxzy.common.util;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

public class RandomId {

    /*站点编码*/
    public static String getSiteId() {
        String s = (new SimpleDateFormat("yyMMddhhssmm")).format(new Date());
        StringBuilder str = new StringBuilder("SITE-");
        str.append(s);
        Random random = new Random();
        int min = 100;
        int max = 999;
        int sum = random.nextInt(max) % (max - min + 1) + min;
        str.append(sum);
        return str.toString();
    }

    /*用户编号*/
    public static String getUserId() {
        String s = (new SimpleDateFormat("yyMMddhhssmm")).format(new Date());
        StringBuilder str = new StringBuilder("USR-");
        str.append(s);
        Random random = new Random();
        int min = 100;
        int max = 999;
        int sum = random.nextInt(max) % (max - min + 1) + min;
        str.append(sum);
        return str.toString();
    }



    /*实名认证编号*/
    public static String getRealNameAuthentication() {
        String s = (new SimpleDateFormat("yyMMddhhssmm")).format(new Date());
        StringBuilder str = new StringBuilder("REAL-");
        str.append(s);
        Random random = new Random();
        int min = 100;
        int max = 999;
        int sum = random.nextInt(max) % (max - min + 1) + min;
        str.append(sum);
        return str.toString();
    }

    /*企业编号*/
    public static String getEnterpriseId() {
        String s = (new SimpleDateFormat("yyMMddhhssmm")).format(new Date());
        StringBuilder str = new StringBuilder("ESTA-");
        str.append(s);
        Random random = new Random();
        int min = 100;
        int max = 999;
        int sum = random.nextInt(max) % (max - min + 1) + min;
        str.append(sum);
        return str.toString();
    }

    /*车辆编号*/
    public static String getVehicleId() {
        String s = (new SimpleDateFormat("yyMMddhhssmm")).format(new Date());
        StringBuilder str = new StringBuilder("VEHI-");
        str.append(s);
        Random random = new Random();
        int min = 100;
        int max = 999;
        int sum = random.nextInt(max) % (max - min + 1) + min;
        str.append(sum);
        return str.toString();
    }

    /*司机编号*/
    public static String getDriverId() {
        String s = (new SimpleDateFormat("yyMMddhhssmm")).format(new Date());
        StringBuilder str = new StringBuilder("DRIV-");
        str.append(s);
        Random random = new Random();
        int min = 100;
        int max = 999;
        int sum = random.nextInt(max) % (max - min + 1) + min;
        str.append(sum);
        return str.toString();
    }

    /*货物编号*/
    public static String getGoods() {
        String s = (new SimpleDateFormat("yyMMddhhssmm")).format(new Date());
        StringBuilder str = new StringBuilder("CM-");
        str.append(s);
        Random random = new Random();
        int min = 100;
        int max = 999;
        int sum = random.nextInt(max) % (max - min + 1) + min;
        str.append(sum);
        return str.toString();
    }

    /*运单操作记录编号*/
    public static String getOperateId() {
        String s = (new SimpleDateFormat("yyMMddhhssmm")).format(new Date());
        StringBuilder str = new StringBuilder("OER-");
        str.append(s);
        Random random = new Random();
        int min = 100;
        int max = 999;
        int sum = random.nextInt(max) % (max - min + 1) + min;
        str.append(sum);
        return str.toString();
    }

    /*货源编号*/
    public static String getSourceId() {
        String s = (new SimpleDateFormat("yyMMddhhssmm")).format(new Date());
        StringBuilder str = new StringBuilder("HY-");
        str.append(s);
        Random random = new Random();
        int min = 100;
        int max = 999;
        int sum = random.nextInt(max) % (max - min + 1) + min;
        str.append(sum);
        return str.toString();
    }

    /*结算方编号*/
    public static String getBusinessId() {
        String s = (new SimpleDateFormat("yyMMddhhssmm")).format(new Date());
        StringBuilder str = new StringBuilder("BUS-");
        str.append(s);
        Random random = new Random();
        int min = 100;
        int max = 999;
        int sum = random.nextInt(max) % (max - min + 1) + min;
        str.append(sum);
        return str.toString();
    }

    /*合作模式编号*/
    public static String getCooperateId() {
        String s = (new SimpleDateFormat("yyMMddhhssmm")).format(new Date());
        StringBuilder str = new StringBuilder("CP-");
        str.append(s);
        Random random = new Random();
        int min = 100;
        int max = 999;
        int sum = random.nextInt(max) % (max - min + 1) + min;
        str.append(sum);
        return str.toString();
    }

    /*运单编号*/
    public static String getOrderId() {
        String s = (new SimpleDateFormat("yyMMddhhssmm")).format(new Date());
        StringBuilder str = new StringBuilder("YD-");
        str.append(s);
        Random random = new Random();
        int min = 100;
        int max = 999;
        int sum = random.nextInt(max) % (max - min + 1) + min;
        str.append(sum);
        return str.toString();
    }
    /*路线编号*/
    public static String getRunId() {
        String s = (new SimpleDateFormat("yyMMddhhssmm")).format(new Date());
        StringBuilder str = new StringBuilder("RUN-");
        str.append(s);
        Random random = new Random();
        int min = 100;
        int max = 999;
        int sum = random.nextInt(max) % (max - min + 1) + min;
        str.append(sum);
        return str.toString();
    }

    /*提货单编号*/
    public static String getBillLadingId() {
        String s = (new SimpleDateFormat("yyMMddhhssmm")).format(new Date());
        StringBuilder str = new StringBuilder("BI-");
        str.append(s);
        Random random = new Random();
        int min = 100;
        int max = 999;
        int sum = random.nextInt(max) % (max - min + 1) + min;
        str.append(sum);
        return str.toString();
    }
    /*磅单编号*/
    public static String getPoundId() {
        String s = (new SimpleDateFormat("yyMMddhhssmm")).format(new Date());
        StringBuilder str = new StringBuilder("BD-");
        str.append(s);
        Random random = new Random();
        int min = 100;
        int max = 999;
        int sum = random.nextInt(max) % (max - min + 1) + min;
        str.append(sum);
        return str.toString();
    }


    /*运单时间信息*/
    public static String getWaybillLogId() {
        String s = (new SimpleDateFormat("yyMMddhhssmm")).format(new Date());
        StringBuilder str = new StringBuilder("LOG-");
        str.append(s);
        Random random = new Random();
        int min = 100;
        int max = 999;
        int sum = random.nextInt(max) % (max - min + 1) + min;
        str.append(sum);
        return str.toString();
    }

    /*装车编号*/
    public static String getLoadingId() {
        String s = (new SimpleDateFormat("yyMMddhhssmm")).format(new Date());
        StringBuilder str = new StringBuilder("LD-");
        str.append(s);
        Random random = new Random();
        int min = 100;
        int max = 999;
        int sum = random.nextInt(max) % (max - min + 1) + min;
        str.append(sum);
        return str.toString();
    }


    /*卸车编号*/
    public static String getUnloadId() {
        String s = (new SimpleDateFormat("yyMMddhhssmm")).format(new Date());
        StringBuilder str = new StringBuilder("UN-");
        str.append(s);
        Random random = new Random();
        int min = 100;
        int max = 999;
        int sum = random.nextInt(max) % (max - min + 1) + min;
        str.append(sum);
        return str.toString();
    }



    /*上报异常编号*/
    public static String getYcId() {
        String s = (new SimpleDateFormat("yyMMddhhssmm")).format(new Date());
        StringBuilder str = new StringBuilder("YC-");
        str.append(s);
        Random random = new Random();
        int min = 100;
        int max = 999;
        int sum = random.nextInt(max) % (max - min + 1) + min;
        str.append(sum);
        return str.toString();
    }






    public static void main(String[] args) {
        String operateId = RandomId.getYcId();
        System.out.println(operateId);
    }


}
